<template>
	<view>
		<uni-nav-bar fixed="true" title="设置" backgroundColor="#f5f5f5" height="120rpx" @clickLeft="back"
			statusBar="true">
			<view slot="left">
				<uni-icons type="back" size="30"></uni-icons>
			</view>
		</uni-nav-bar>
		<u-cell-group :border="false">
			<u-cell isLink @click="edit_info">
				<text slot="title" class="card">修改资料</text>
			</u-cell>
			<u-cell isLink @click="edit_email">
				<text slot="title" class="card">修改绑定邮箱</text>
			</u-cell>
			<u-cell isLink @click="edit_password">
				<text slot="title" class="card">修改密码</text>
			</u-cell>
			<u-cell isLink @click="about">
				<text slot="title" class="card">关于</text>
			</u-cell>
		</u-cell-group>
		<view class="div">
		</view>
		<u-modal width="500rpx" :show="out" title="温馨提示" content='您确定要退出登录吗?' showCancelButton @confirm="logout"
			@cancel="out = false"></u-modal>
		<view class="out" @click="out = true" hover-class="out_hover">
			退出登录
		</view>
		<view class="div">
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				out: false,
			}
		},
		methods: {
			edit_info() {
				uni.navigateTo({
					url: "../info_edit/info_edit"
				})
			},
			edit_email() {
				uni.navigateTo({
					url: "email_edit/email_edit"
				})
			},
			edit_password() {
				uni.navigateTo({
					url: "password_edit/password_edit"
				})
			},
			about() {
				uni.navigateTo({
					url: "about/about"
				})
			},
			logout() {
				let self = this
				uni.reLaunch({
					url: "../login/login",
					success() {
						self.$store.commit("logout")
					}
				})
			},
			back() {
				uni.navigateBack({})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.body {
		margin: 0 auto;
		width: 90%;
	}

	.card {
		font-size: 35rpx;
		padding: 10rpx 0;
	}

	.div {
		height: 15rpx;
		background-color: #F6F6F6;
	}

	/deep/.u-cell .u-line {
		display: none;
	}

	.out {
		height: 100rpx;
		line-height: 100rpx;
		text-align: center;
		font-size: 35rpx;
	}

	.out_hover {
		background-color: #F3F4F6;
	}
</style>
